# -*- coding: utf-8 -*-

from odoo import models, fields


class BasicHypertension(models.Model):
    _name = 'basic_hypertension_follow'
    _description = '高血压随访表'

    healthCheck = fields.Char(string="体检编号", required=True)
    resident_id = fields.Many2one("basic_info", ondelete='set null', string="居民ID", index=True)
    visitDate = fields.Date(string="随访日期", default=fields.Date.today())
    visitWay = fields.Char(string="随访方式")
    hypertens = fields.Integer(string="高血压")
    hypotens = fields.Integer(string="低血压")
    constipation = fields.Float(string='便秘')
    height = fields.Float(string='身高')
    weight = fields.Float(string='体重')
    waistline = fields.Float(string='腰围')
    other = fields.Char(string="其他")
    smokeCount = fields.Float(string='日吸烟量')
    drinkCount = fields.Float(string='日饮酒量')
    trainTimesWeek = fields.Float(string='运动频率(周运动次数)')
    trainMinute = fields.Float(string='运动时长(每次时长(分))')

    salt = fields.Char(string="摄盐情况")
    psych_feat = fields.Char(string="心理特征")
    obeyDoctor = fields.Selection([
        ('1', '良好'),
        ('2', '一般'),
        ('3', '差')],
        string="遵医行为")
    auxiliaryCheck = fields.Char(string="辅助检查")
    medicine = fields.Char(string="服药依从性")
    medicineBadEffect = fields.Char(string="药物不良反应")
    medicineBadEffectText = fields.Char(string="药物不良反应描述")
    visitEvaluate = fields.Char(string="随访分类")
    visitDoctor = fields.Char(string="随访医生")
    resident_signa = fields.Char(string="居民签名")
    remark = fields.Char(string="备注")
    basic_info = fields.Char(string="基本情况")
    indenti_rst = fields.Char(string="鉴定结果")
    indenti_rst_name = fields.Char(string="鉴定结果名称")

    inputDate = fields.Date(string="创建时间", default=fields.Date.today())
    inputUser = fields.Char(string="创建人")
    is_delete = fields.Boolean(string="是否删除")
    next_flup_date = fields.Date(string="下次随访日期", default=fields.Date.today())
    smoking_info_status = fields.Integer(string="吸烟情况-吸烟状况")
    smoking_age = fields.Integer(string="吸烟情况-开始吸烟年龄")
    is_smoking_last_sevn_days = fields.Boolean(string="最近7日是否吸烟")
    lifestyle_guid = fields.Char(string="生活方式指导")
    flup_sympt = fields.Integer(string="随访症状")
    ref_date = fields.Date(string="转诊日期", default=fields.Date.today())
    is_gen_auto = fields.Boolean(string="是否是自动生成 0不是自动生成 1自动生成")

    followup_type = fields.Selection([
        ('1', '正常随访'),
        ('2', '二次随访')],
        string="随访类型")
